Ext.define('NF.view.farm.LivestockInfo', {
    extend:'Ext.panel.Panel',
    alias:'widget.livestockInfo',
    frame:true,
    livestockStore:null,
    itemId:Ext.id('livestockInfo'),
    initComponent:function(){
        this.frameHeader = this.context.id;
        this.prepareLivestockInfo();
        this.html = this.context.id +":"+this.context.name;
        this.callParent(arguments);
    },
    prepareLivestockInfo:function() {
        var self = this;
        self.livestockStore = Ext.create('Ext.data.Store', {
            model:'NF.model.Livestock',
            autoLoad:false,
            autoSync:false,
            proxy:{
                type:'ajax',
                url:'livestock/getLivestockDetails.json',
                reader:{
                    type:'json',
                    root:'livestockDetails',
                    totalProperty:'total'
                }
            }
        });
    }
});